import axios from 'axios'

let instance = axios.create({
  baseURL: 'http://127.0.0.1:3000'
})

instance.interceptors.request.use((config) => {
  config.headers.authorization = sessionStorage.getItem('token')
  return config;
})

instance.interceptors.response.use((response) => {
  return response;
})

export default instance;